Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate unnecessary guard around map access warning (S1036) #829

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

tpdownes
Copy link
Member

This PR eliminates a "harmless" warning reported by VS Code. We can rely on the behavior of Go to return zero values when accessing elements of a map that do not yet exist.

https://staticcheck.io/docs/checks#S1036

Submission Checklist

  • Have you installed and run this change against pre-commit? (pre-commit install)
  • Are all tests passing? (make tests)
  • Have you written unit tests to cover this change?
  • Is unit test coverage still above 80%?
  • Have you updated all applicable documentation?
  • Have you followed the guidelines in our Contributing document?

@nick-stroud nick-stroud assigned tpdownes and unassigned nick-stroud Jan 11, 2023
@tpdownes tpdownes merged commit 4f06190 into GoogleCloudPlatform:develop Jan 11, 2023
@tpdownes tpdownes deleted the fix_s1036_warning branch January 11, 2023 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants